﻿using HlELock.Core;
using Prism.Mvvm;
using System.Collections.Generic;

namespace HlELock.Modules.Hotel.Agency.ViewModels
{
    public class SendCardWindowViewModel : BindableBase
    {
        public SendCardWindowViewModel()
        {
            SendCard();
        }

        private List<string> CardCodes { get; set; } = new List<string>();

        private string _descr;
        public string Descr
        {
            get { return _descr; }
            set { SetProperty(ref _descr, value); }
        }

        private int _total;
        /// <summary>
        /// 当前发卡数量
        /// </summary>
        public int Total
        {
            get { return _total; }
            set { SetProperty(ref _total, value); }
        }

        private void SendCard()
        {
            Descr = AppHelper.GetResourceString("QingJianKaPianFangDaoSheBeiShang");
            var result = MyAppContext.Device.SendJmjCard();
            if (result.IsSuccess)
            {
                SendCard();
            }
        
        }
    }
}
